﻿do
	IGAS:NewAddon("IGAS_Studio")
	
	local _DB = CreateHelpDB("Addon", "Function")
	
	_DB:AddCodeHelp("AddSlashCmd", [[Add slash commands for this Addon.]], [[AddSlashCmd(slash1, [slash2, ...])]])
	_DB:AddCodeHelp("AddSavedVariable", [[Add SavedVariable for this Addon.]], [[AddSavedVariable(name)]])
	_DB:AddCodeHelp("IsEventRegistered", [[Check if this Addon had registered a event by the name.]], [[IsEventRegistered(event)]])
	_DB:AddCodeHelp("RegisterEvent", [[Register event for this Addon.]], [[RegisterEvent(event)]])
	_DB:AddCodeHelp("UnregisterEvent", [[UnRegister event for this Addon.]], [[UnregisterEvent(event)]])
	_DB:AddCodeHelp("UnregisterAllEvents", [[UnRegister All event for this Addon.]], [[UnregisterAllEvents()]])
	_DB:AddCodeHelp("FireEvent", [[Raise a custom event to other event-handlers.]], [[FireEvent(event, [...])]])
	_DB:AddCodeHelp("Fire", [[Trigger a custom script type.]], [[Fire(script, [...])]])
	_DB:AddCodeHelp("HasScript", [[Check if this Addon has a custom script handler.]], [[HasScript(script)]])
	_DB:AddCodeHelp("GetScript", [[Return the custom script handler from this Addon.]], [[GetScript(script)]])
	_DB:AddCodeHelp("SetScript", [[Set the custom script handler for the Addon.]], [[SetScript(script, handler)]])
	_DB:AddCodeHelp("StackScript", [[Stack the custom script handler for the Addon.]], [[StackScript(script, handler, [clear])]])
	_DB:AddCodeHelp("UnStackScript", [[UnStack the custom script handler for the Addon.]], [[UnStackScript(script, handler)]])
	_DB:AddCodeHelp("GetMetadata", [[Get Metadata(such as author) from the Addon.]], [[GetMetadata(field)]])
	_DB:AddCodeHelp("SetMetadata", [[Set Metadata(such as author) from the Addon.]], [[SetMetadata(field, value)]])
	_DB:AddCodeHelp("Enable", [[Enable the Addon, it can receive all registered events.]], [[Enable()]])
	_DB:AddCodeHelp("Disable", [[Disable the Addon, it can't receive all registered events.]], [[Disable()]])
	_DB:AddCodeHelp("IsEnabled", [[Check this Addon is enabled or disabled.]], [[IsEnabled()]])
	_DB:AddCodeHelp("AddFrame", [[Add frame to this Addon, it will auto-dispose when this Addon is disposed.]], [[AddFrame(frame)]])
	_DB:AddCodeHelp("RemoveFrame", [[Remove a frame from this Addon, and this frame would be disposed.]], [[RemoveFrame(frame)]])
	_DB:AddCodeHelp("NewModule", [[Create or get a child-module of this addon.And set the environment to the child-module.]], [[NewModule(name)]])
	_DB:AddCodeHelp("Dispose", [[Dispose this Addon.]], [[Dispose()]])
	_DB:AddCodeHelp("GetModule", [[Get the child-module of this addon]], [[GetModule(name)]])
	
	_DB = CreateHelpDB("Addon", "ScriptType")
	_DB:AddCodeHelp("OnLoad", [[Fired when the addon is loaded(the addon and it's savedvariables is loaded).]], [[OnLoad()]])
	_DB:AddCodeHelp("OnEnable", [[Fired when Enable this Addon.]], [[OnEnable()]])
	_DB:AddCodeHelp("OnDisable", [[Fired when Disabled this Addon.]], [[OnDisable()]])
	_DB:AddCodeHelp("OnDispose", [[Fired when Dispose this Addon.]], [[OnDispose()]])
	_DB:AddCodeHelp("OnSlashCmd", [[Fired when the slash cmds are triggered.]], [[OnSlashCmd(msg)]])

	_DB = CreateHelpDB("Module", "Function")
	_DB:AddCodeHelp("NewModule", [[Create or get a child-module of this module.And set the environment to the child-module.]], [[NewModule(name)]])
	_DB:AddCodeHelp("Dispose", [[This is using to dispose a module, and set the enviroment to it's container if needed..]], [[Dispose()]])
	_DB:AddCodeHelp("IsEventRegistered", [[Returns true if the given event is registered to the module.]], [[IsEventRegistered(event)]])
	_DB:AddCodeHelp("RegisterEvent", [[Indicate that this module should be notified when event occurs.]], [[RegisterEvent(event)]])
	_DB:AddCodeHelp("UnregisterEvent", [[Indicate that this module should no longer be notified when event occurs.]], [[UnregisterEvent(event)]])
	_DB:AddCodeHelp("UnregisterAllEvents", [[Indicate that this module should no longer be notified when all event occurs.]], [[UnregisterAllEvents()]])
	_DB:AddCodeHelp("FireEvent", [[Fire Event, can only be used to fire custom event, fire system event will do nothing.]], [[FireEvent(event, [...])]])
	_DB:AddCodeHelp("GetModule", [[Get the child-module of this module]], [[GetModule(name)]])
end